<script type="text/javascript">
	$(document).ready(function(){
		$(".tabContents").hide();
		$(".tabContents:first").show();
		
		$(".module-title div.ct").click(function(){
			var activeTab = $(this).attr("name"); 
			$(".module-title div.ct").removeClass("active"); 
			$(this).addClass("active"); 
			$(".tabContents").hide(); 
			$(activeTab).fadeIn(); 
		});
	});
</script>
<div id="tabs-right"> 
	<div class="module-title">
		<div class="ct titleC1 active" name="#tab1">
			<h3 class="title-qnew"><span>Tin tức mới nhất</span></h3>
		</div>
	
		<div class="ct titleC2" name="#tab2">
			<h3 class="title-qhit"><span>Nhiều người đọc nhất</span></h3>
		</div>
	</div>
	<div id="tab1" class="module-content tabContents">
		<div class="module-content-inner">
        <!--noi dung 1-->
        <?php if(!empty($moinhat)){
            $i=0;
            foreach ($moinhat as $moinhat){ 
            $link = base_url().'tin-tuc/'.$moinhat->alias.'.html';
            $i++;
            echo '<div class="rowtab';
            echo $i%2== 0? " even":" odd";
            echo '">
				<div class="img fLeft"><img src="'.$moinhat->image.'" alt=""/></div>
				<div class="text fRight">
					<a class="title" href="'.$link.'">'.$moinhat->title.'.</a>
					<p class="date">'.$moinhat->created.'</p>
				</div>
			</div>
            ';
        } }?>			
        <!--end noi dung 1-->		
		</div>
	</div><!-- END TAB1 -->
	<div id="tab2" class="module-content tabContents">
		<div class="module-content-inner">
        <!--noi dung 2-->
        <?php if(!empty($docnhieu)){
            $i=0;
            foreach ($docnhieu as $docnhieu){  
                $i++;
                $link = base_url().'tin-tuc/'.$docnhieu->alias.'.html';
            echo '
            <div class="rowtab';
            echo $i%2== 0? " even":" odd";
            echo '">
				<div class="img fLeft"><img src="'.base_url().$docnhieu->image.'" alt=""/></div>
				<div class="text fRight">
					<a class="title" href="'.$link.'">'.$docnhieu->title.'.</a>
					<p class="date">'.$docnhieu->created.'</p>
				</div>
			</div>
            ';
        } }?>			
        <!--end noi dung 2-->
		
		</div>
	</div><!-- END TAB2 -->
</div><!-- End TABS -->